BIN=myproc.exe 
SRC=$(shell ls *.c)
#SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
#SRC=myproc.c
#OBJ=myproc.o
LFLAGS=-o
FLAGS=-c
RM=rm -f


$(BIN):$(OBJ)
	@$(CC) $(LFLAGS) $@ $^
	@echo "linking ...  $^ to $@"
%.o:%.c
  #@$(CC) $(FLAGS) $^ $(LFLAGS) $@
	#@$(CC) $(FLAGS) $^
	@$(CC) $(FLAGS) $<
	@echo "compeling ... $< to $@"
.PHONY:
clean:
	@$(RM) $(BIN) $(OBJ)
	@echo "remove ... $(BIN) $(OBJ)"

.PHONY:test
test:
	@echo $(OBJ)
	@echo $(SRC)


